﻿@page
@{ Layout = "_Layout"; }
<el-card>
    <div slot="header" class="clearfix">
        <span>修改管理员账号密码</span>
        <el-button style="float: right;padding:3px 0;" type="text" v-on:click="utils.closeLayer"><i class="el-icon-close"></i></el-button>
    </div>
    <el-scrollbar class="scrollbar" :style="{ height: ($(window).innerHeight()-180) + 'px' }">
        <div style="margin-right:18px;">
            <el-alert v-if="isEnforcePasswordChange"
                      title="你的密码很久没有修改了，为降低安全风险，请您重新设置密码后再登录"
                      type="warning">
            </el-alert>
            <el-form :size="euiSize" v-on:submit.native.prevent ref="form" :model="form" status-icon label-width="140px">
                <el-form-item label="账号">
                    {{ administrator.userName }}
                </el-form-item>
                <el-form-item v-if="oldPassword" label="旧密码" prop="oldPassword" :rules="[{ required: true, message: '请输入旧密码' }]">
                    <el-input v-model="form.oldPassword" type="password" name="oldPassword" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="新密码" prop="password" :rules="[{ required: true, message: '请输入新密码' }]">
                    <el-input v-model="form.password" type="password" name="password" autocomplete="off"></el-input>
                </el-form-item>
                <el-form-item label="确认密码" prop="confirmPassword" :rules="[{ required: true, message: '请输入确认密码' }, { validator: validatePass }]">
                    <el-input v-model="form.confirmPassword" type="password" name="confirmPassword" autocomplete="off"></el-input>
                </el-form-item>
            </el-form>
        </div>
    </el-scrollbar>
</el-card>
<el-row align="center" style="margin-top:18px;">
    <el-col :span="24" align="center">
        <el-button :size="euiSize" type="primary" v-on:click="btnSubmitClick">确 定</el-button>
        <el-button :size="euiSize" v-on:click="btnCancelClick">关 闭</el-button>
    </el-col>
</el-row>

@section Scripts{
  <script src="/sitefiles/assets/js/admin/settings/administratorsLayerPassword.js" type="text/javascript"></script>
}